package com.jbit.userserver.service.impl;

import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.jbit.userserver.mapper.PlatformConfigMapper;
import com.jbit.userserver.model.entity.PlatformConfig;
import com.jbit.userserver.service.PlatformConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PlatformConfigServiceImpl implements PlatformConfigService {
    @Resource
    private PlatformConfigMapper jshPlatformConfigMapper;
    @Override
    public PlatformConfig getPlatformByKey(String key) {
        MPJLambdaWrapper<PlatformConfig> lambdaWrapper = new MPJLambdaWrapper<>();
        lambdaWrapper.eq(PlatformConfig::getPlatformKey,key);
        return jshPlatformConfigMapper.selectOne(lambdaWrapper);
    }
}
